import { INCREMENT, DECREMENT } from "./action-types";
export const counter = (state=0, action) => {
    // console.log(action.data,'reducer()');

    switch (action.type) {
        case INCREMENT:
            return state + action.data
            break;
        case DECREMENT:
            return state - action.data
            break;
        default:
            return state
    }
}